<?php /*a:3:{s:76:"F:\phpstudy\PHPTutorial\WWW\tp6cms\application\admin\view\content\index.html";i:1557727890;s:74:"F:\phpstudy\PHPTutorial\WWW\tp6cms\application\admin\view\common\head.html";i:1557047321;s:74:"F:\phpstudy\PHPTutorial\WWW\tp6cms\application\admin\view\common\left.html";i:1557730454;}*/ ?>
<!DOCTYPE html>
<html>

<head>
    <meta charset="utf-8">
    <title>文档列表</title>

    <meta name="description" content="Dashboard">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <!--Basic Styles-->
    <link href="/static/admin/style/bootstrap.css" rel="stylesheet">
    <link href="/static/admin/style/font-awesome.css" rel="stylesheet">
    <link href="/static/admin/style/weather-icons.css" rel="stylesheet">
    <link href="/static/admin/plus/layui/css/layui.css" rel="stylesheet">
    <!--Beyond styles-->
    <link id="beyond-link" href="/static/admin/style/beyond.css" rel="stylesheet" type="text/css">
    <link href="/static/admin/style/demo.css" rel="stylesheet">
    <link href="/static/admin/style/typicons.css" rel="stylesheet">
    <link href="/static/admin/style/animate.css" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-3.3.1.min.js"></script>
    <script src="/static/admin/plus/layer/layer.js"></script>

<style>
.open{
    border: 1px solid #ccc;
padding: 0 3px 0 3px;
cursor: pointer;
}
</style>
</head>

<body>
    <!-- 头部 -->
    <div class="navbar">
    <div class="navbar-inner">
        <div class="navbar-container">
            <!-- Navbar Barnd -->
            <div class="navbar-header pull-left">
                <a href="#" class="navbar-brand">
                    <small>
                        <img src="/static/admin/images/logo.png" alt="">
                    </small>
                </a>
            </div>
            <!-- /Navbar Barnd -->
            <!-- Sidebar Collapse -->
            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="collapse-icon fa fa-bars"></i>
            </div>
            <!-- /Sidebar Collapse -->
            <!-- Account Area and Settings -->
            <div class="navbar-header pull-right">
                <div class="navbar-account">
                    <ul class="account-area">
                        <li>
                            <a class="login-area dropdown-toggle" data-toggle="dropdown">
                                <div class="avatar" title="View your public profile">
                                    <img src="/static/admin/images/adam-jansen.jpg">
                                </div>
                                <section>
                                    <h2><span class="profile"><span>admin</span></span></h2>
                                </section>
                            </a>
                            <!--Login Area Dropdown-->
                            <ul class="pull-right dropdown-menu dropdown-arrow dropdown-login-area">
                                <li class="username"><a>David Stevenson</a></li>
                                <li class="dropdown-footer">
                                    <a href="/admin/user/logout.html">
                                        退出登录
                                    </a>
                                </li>
                                <li class="dropdown-footer">
                                    <a href="/admin/user/changePwd.html">
                                        修改密码
                                    </a>
                                </li>
                            </ul>
                            <!--/Login Area Dropdown-->
                        </li>
                        <!-- /Account Area -->
                        <!--Note: notice that setting div must start right after account area list.
                        no space must be between these elements-->
                        <!-- Settings -->
                    </ul>
                </div>
            </div>
            <!-- /Account Area and Settings -->
        </div>
    </div>
</div>

    <!-- /头部 -->

    <div class="main-container container-fluid">
        <div class="page-container">
            <!-- Page Sidebar -->
            <div class="page-sidebar" id="sidebar">
                <!-- Page Sidebar Header-->
                <div class="sidebar-header-wrapper">
                    <input class="searchinput" type="text">
                    <i class="searchicon fa fa-search"></i>
                    <div class="searchhelper">Search Reports, Charts, Emails or Notifications</div>
                </div>
                <!-- /Page Sidebar Header -->
                <!-- Sidebar Menu -->
                <ul class="nav sidebar-menu">
    <!--Dashboard-->
    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-cog"></i>
        <span class="menu-text">系统设置</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('admin/config/index'); ?>">
                    <span class="menu-text">
                        配置管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-user"></i>
        <span class="menu-text">管理员</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        管理列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-folder"></i>
        <span class="menu-text">栏目管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('admin/cate/index'); ?>">
                    <span class="menu-text">
                        栏目列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="<?php echo url('admin/cate/create'); ?>">
                    <span class="menu-text">
                        栏目添加 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-file-text"></i>
        <span class="menu-text">文档管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('content/index'); ?>">
                    <span class="menu-text">
                        文章列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="<?php echo url('content/create'); ?>">
                    <span class="menu-text">
                        文章添加 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-maxcdn"></i>
        <span class="menu-text">模型管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('models/create'); ?>">
                    <span class="menu-text">
                        添加模型 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="<?php echo url('models/index'); ?>">
                    <span class="menu-text">
                        模型列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-tasks"></i>
        <span class="menu-text">自定义字段管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('fields/create'); ?>">
                    <span class="menu-text">
                        添加字段 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="<?php echo url('fields/index'); ?>">
                    <span class="menu-text">
                        字段列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li>
        <a href="#" class="menu-dropdown">
            <i class="menu-icon fa fa-users"></i>
            <span class="menu-text">会员管理</span>
            <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="/admin/document/index.html">
                    <span class="menu-text">
                        文章列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li  class="open" > <a href="#"
        class="menu-dropdown">
        <i class="menu-icon fa fa-lock"></i>
        <span class="menu-text">权限配置</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        规则管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="">
                    <span class="menu-text">
                        用户组管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li  > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa  fa-video-camera"></i>
        <span class="menu-text">广告管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="<?php echo url('adpos/index'); ?>">
                    <span class="menu-text">
                        广告位管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="<?php echo url('ad/index'); ?>">
                    <span class="menu-text">
                        广告管理 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li>
        <a href="#" class="menu-dropdown">
            <i class="menu-icon fa fa-sitemap"></i>
            <span class="menu-text">数据库管理</span>
            <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        备份数据库 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li>
        <a href="#" class="menu-dropdown">
            <i class="menu-icon fa fa-dashboard "></i>
            <span class="menu-text">模板管理</span>
            <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        文章列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>

    <li class="open" > <a href="#" class="menu-dropdown">
        <i class="menu-icon fa fa-bug"></i>
        <span class="menu-text">采集管理</span>
        <i class="menu-expand"></i>
        </a>
        <ul class="submenu">
            <li>
                <a href="">
                    <span class="menu-text">
                        添加采集节点 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
            <li>
                <a href="">
                    <span class="menu-text">
                        采集节点列表 </span>
                    <i class="menu-expand"></i>
                </a>
            </li>
        </ul>
    </li>



</ul>
                <!-- /Sidebar Menu -->
            </div>
            <!-- /Page Sidebar -->
            <!-- Page Content -->
            <div class="page-content">
                <!-- Page Breadcrumb -->
                <div class="page-breadcrumbs">
                    <ul class="breadcrumb">
                        <li class="active">

                            <i class="fa fa-home"></i>
                            <a href="<?php echo url('content/index'); ?>">
                                文档管理
                            </a>
                        </li>
                        <li>文档列表</li>
                    </ul>

                </div>
                <!-- /Page Breadcrumb -->

<!-- Page Body -->
<div class="page-body">

<button type="button" tooltip="添加文档" class="btn btn-sm btn-azure btn-addon"
onclick="javascript:window.location.href = '<?php echo url('admin/content/create',['cid'=>$CateId]); ?>'"> <i
class="fa fa-plus"></i> Add
</button>
<div class="row">
<div class="col-lg-12 col-sm-12 col-xs-12">
<div class="widget">
<div class="widget-body">
<div class="flip-scroll">
<table class="table table-bordered table-hover">
    <thead class="">
        <tr >
            <th class="text-center" width="8%">ID</th>
            <th class="text-center" >标题</th>
            <th class="text-center" width="10%">所属栏目</th>
            <th class="text-center" width="10%">所属模型</th>
            <th class="text-center" width="10%">点击次数</th>
            <th class="text-center" width="10%">发布时间</th>
            <th class="text-center" width="10%">操作</th>
        </tr>
    </thead>
    <tbody>

        <?php if(is_array($artRes) || $artRes instanceof \think\Collection || $artRes instanceof \think\Paginator): $i = 0; $__LIST__ = $artRes;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?>
        <tr >
            <td align="center"><?php echo htmlentities($vo['id']); ?></td>
            <td align="center"><?php echo htmlentities($vo['title']); ?>
                <span style="color:red;"><?php if(!(empty($vo['litpic']) || (($vo['litpic'] instanceof \think\Collection || $vo['litpic'] instanceof \think\Paginator ) && $vo['litpic']->isEmpty()))): ?>[图片]<?php endif; ?></span>  
            </td>
            <td align="center"><?php echo htmlentities($vo['catename']); ?></td>
            <td align="center"><?php echo htmlentities($vo['model_name']); ?></td>
            <td align="center"><?php echo htmlentities($vo['click']); ?></td>
            <td align="center"><?php echo htmlentities(date("Y-m-d H:i:s",!is_numeric($vo['pubdate'])? strtotime($vo['pubdate']) : $vo['pubdate'])); ?></td>
            <td align="center">
                <a href="" class="btn-sm btn btn-success " title="预览">
                    <i class="fa fa-desktop"></i> 
                </a>    
                <a href="<?php echo url('content/edit',array('id'=>$vo['id'])); ?>" class="btn btn-primary btn-sm shiny" title="编辑">
                    <i class="fa fa-edit"></i> 
                </a>
                <a href="javascript:;" onclick="del(this)"
                    class="btn btn-danger btn-sm shiny del" title="删除" id="<?php echo htmlentities($vo['id']); ?>">
                    <i class="fa fa-trash-o"></i> 
                </a>
            </td>
        </tr>
        <?php endforeach; endif; else: echo "" ;endif; ?>
    </tbody>
</table>
<?php echo $artRes; ?>

</div>
<div>
</div>
</div>
</div>
</div>
</div>

</div>

</div>
            <!-- /Page Body -->
        </div>
        <!-- /Page Content -->
    </div>
    </div>

    <!--Basic Scripts-->
    <script src="/static/admin/style/jquery_002.js"></script>
    <script src="/static/admin/style/bootstrap.js"></script>
    <script src="/static/admin/style/jquery.js"></script>
    <!--Beyond Scripts-->
    <script src="/static/admin/style/beyond.js"></script>
<script>
    $(function(){

      
    });
    
    //  删除
        function del(o) {
            var id = $(o).attr('id');
            layer.confirm('确认要删除该文档吗', { icon: 3, title: '温馨提示' }, function (index) {
                $.post("<?php echo url('admin/content/delete'); ?>", { id: id }, function (res) {

                    if (res.code == 1) {
                        layer.msg(res.msg, { time: 1000, icon: 1 }, function () {
                            location.reload();
                        });
                    } else {
                        layer.msg(res.msg, { icon: 2, time: 2000 });
                    }
                });

                layer.close(index);
            });

        }
   
   
   
   

</script>


</body>

</html>